package com.quyunshuo.module.home.fragment.me

import com.quyunshuo.edwinpro.base.mvvm.m.BaseRepository
import com.quyunshuo.edwinpro.network.HomeApiService
import com.quyunshuo.edwinpro.network.bean.BaseResponse
import com.quyunshuo.edwinpro.network.bean.ProjectTabItem
import com.quyunshuo.module.home.room.database.SumDataBase
import com.quyunshuo.module.home.room.entity.ConcentrationEntity
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

/**
 * @author DBoy 2021/7/6 <p>
 * - 文件描述 :
 */

class MeRepository @Inject constructor() : BaseRepository() {
    private  val TAG = "HomeRepository"

    private val concentrationDao by lazy {
        SumDataBase.getInstance().concentrationDao()
    }

    //我想查询天数，应该如何查询呢？有的是总统计，去重
    fun getTotalFocusDays():Flow<Int> = concentrationDao.getTotalFocusDays()

    fun getAll():Flow<List<ConcentrationEntity>> = concentrationDao.getAllConcentration()
    suspend fun getAll2():List<ConcentrationEntity> = concentrationDao.getAll()

}